<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>wickr-crypto-c: wickr_stream_key</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">wickr-crypto-c
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">wickr_stream_key</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwickr__stream__key.html">wickr_stream_key</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A data structure representing the stream encoding / decoding key material A stream key holds information about the key material used for cipher operations as well as it's next evolution key and the number of packets this key should be used to encode or decode before evolution takes place.  <a href="structwickr__stream__key.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga54449667a25d9e64cd04dae58dd76418"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__stream__key.html">wickr_stream_key_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__stream__key.html#ga54449667a25d9e64cd04dae58dd76418">wickr_stream_key_create</a> (<a class="el" href="structwickr__cipher__key.html">wickr_cipher_key_t</a> *cipher_key, <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *evolution_key, uint32_t packets_per_evolution)</td></tr>
<tr class="separator:ga54449667a25d9e64cd04dae58dd76418"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaff8e766f3519e9e73157938bd1d3e024"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__stream__key.html">wickr_stream_key_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__stream__key.html#gaff8e766f3519e9e73157938bd1d3e024">wickr_stream_key_create_user_data</a> (<a class="el" href="structwickr__cipher__key.html">wickr_cipher_key_t</a> *cipher_key, <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *evolution_key, uint32_t packets_per_evolution, <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *user_data)</td></tr>
<tr class="separator:gaff8e766f3519e9e73157938bd1d3e024"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9e95dd486dbe2f3db647c65042601b34"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__stream__key.html">wickr_stream_key_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__stream__key.html#ga9e95dd486dbe2f3db647c65042601b34">wickr_stream_key_create_rand</a> (const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> engine, <a class="el" href="structwickr__cipher.html">wickr_cipher_t</a> cipher, uint32_t packets_per_evolution)</td></tr>
<tr class="separator:ga9e95dd486dbe2f3db647c65042601b34"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0201dd73adf773834d7dbb4bbc307fae"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__stream__key.html">wickr_stream_key_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__stream__key.html#ga0201dd73adf773834d7dbb4bbc307fae">wickr_stream_key_copy</a> (const <a class="el" href="structwickr__stream__key.html">wickr_stream_key_t</a> *stream_key)</td></tr>
<tr class="separator:ga0201dd73adf773834d7dbb4bbc307fae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae1540c98a88e2f62e96fb2ee209e2290"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__stream__key.html#gae1540c98a88e2f62e96fb2ee209e2290">wickr_stream_key_serialize</a> (const <a class="el" href="structwickr__stream__key.html">wickr_stream_key_t</a> *key)</td></tr>
<tr class="separator:gae1540c98a88e2f62e96fb2ee209e2290"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadf1565329fed927531e1a14334ed23e4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__stream__key.html">wickr_stream_key_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__stream__key.html#gadf1565329fed927531e1a14334ed23e4">wickr_stream_key_create_from_buffer</a> (const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *buffer)</td></tr>
<tr class="separator:gadf1565329fed927531e1a14334ed23e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3bb3dec760c5b7f3a1bd2d0bb13bcc79"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__stream__key.html#ga3bb3dec760c5b7f3a1bd2d0bb13bcc79">wickr_stream_key_destroy</a> (<a class="el" href="structwickr__stream__key.html">wickr_stream_key_t</a> **stream_key)</td></tr>
<tr class="separator:ga3bb3dec760c5b7f3a1bd2d0bb13bcc79"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga0201dd73adf773834d7dbb4bbc307fae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0201dd73adf773834d7dbb4bbc307fae">&#9670;&nbsp;</a></span>wickr_stream_key_copy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__stream__key.html">wickr_stream_key_t</a>* wickr_stream_key_copy </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__stream__key.html">wickr_stream_key_t</a> *&#160;</td>
          <td class="paramname"><em>stream_key</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copy a stream key</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stream_key</td><td>the stream key to copy </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated stream key holding a deep copy of properties from 'stream_key' </dd></dl>

</div>
</div>
<a id="ga54449667a25d9e64cd04dae58dd76418"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga54449667a25d9e64cd04dae58dd76418">&#9670;&nbsp;</a></span>wickr_stream_key_create()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__stream__key.html">wickr_stream_key_t</a>* wickr_stream_key_create </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwickr__cipher__key.html">wickr_cipher_key_t</a> *&#160;</td>
          <td class="paramname"><em>cipher_key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>evolution_key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>packets_per_evolution</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a stream key from components</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cipher_key</td><td>see documentation of '<a class="el" href="structwickr__stream__key.html" title="A data structure representing the stream encoding / decoding key material A stream key holds informat...">wickr_stream_key</a>' structure </td></tr>
    <tr><td class="paramname">evolution_key</td><td>see documentation of '<a class="el" href="structwickr__stream__key.html" title="A data structure representing the stream encoding / decoding key material A stream key holds informat...">wickr_stream_key</a>' structure </td></tr>
    <tr><td class="paramname">packets_per_evolution</td><td>see documentation of '<a class="el" href="structwickr__stream__key.html" title="A data structure representing the stream encoding / decoding key material A stream key holds informat...">wickr_stream_key</a>' structure </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated stream key owning the properties passed in </dd></dl>

</div>
</div>
<a id="gadf1565329fed927531e1a14334ed23e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadf1565329fed927531e1a14334ed23e4">&#9670;&nbsp;</a></span>wickr_stream_key_create_from_buffer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__stream__key.html">wickr_stream_key_t</a>* wickr_stream_key_create_from_buffer </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>buffer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a stream key from a serialized buffer</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">buffer</td><td>the buffer to parse into a stream key </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated stream key represented by 'buffer' or NULL if parsing buffer fails </dd></dl>

</div>
</div>
<a id="ga9e95dd486dbe2f3db647c65042601b34"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9e95dd486dbe2f3db647c65042601b34">&#9670;&nbsp;</a></span>wickr_stream_key_create_rand()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__stream__key.html">wickr_stream_key_t</a>* wickr_stream_key_create_rand </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a>&#160;</td>
          <td class="paramname"><em>engine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__cipher.html">wickr_cipher_t</a>&#160;</td>
          <td class="paramname"><em>cipher</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>packets_per_evolution</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Generate a random stream key</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">engine</td><td>the crypto engine to use for secure random cipher key generation </td></tr>
    <tr><td class="paramname">cipher</td><td>the cipher to use for generation of the internal 'cipher_key' property </td></tr>
    <tr><td class="paramname">packets_per_evolution</td><td>the number of times this key should be used before it evoloves </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated stream key </dd></dl>

</div>
</div>
<a id="gaff8e766f3519e9e73157938bd1d3e024"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaff8e766f3519e9e73157938bd1d3e024">&#9670;&nbsp;</a></span>wickr_stream_key_create_user_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__stream__key.html">wickr_stream_key_t</a>* wickr_stream_key_create_user_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwickr__cipher__key.html">wickr_cipher_key_t</a> *&#160;</td>
          <td class="paramname"><em>cipher_key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>evolution_key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>packets_per_evolution</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a stream key from components with user data</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cipher_key</td><td>see documentation of '<a class="el" href="structwickr__stream__key.html" title="A data structure representing the stream encoding / decoding key material A stream key holds informat...">wickr_stream_key</a>' structure </td></tr>
    <tr><td class="paramname">evolution_key</td><td>see documentation of '<a class="el" href="structwickr__stream__key.html" title="A data structure representing the stream encoding / decoding key material A stream key holds informat...">wickr_stream_key</a>' structure </td></tr>
    <tr><td class="paramname">packets_per_evolution</td><td>see documentation of '<a class="el" href="structwickr__stream__key.html" title="A data structure representing the stream encoding / decoding key material A stream key holds informat...">wickr_stream_key</a>' structure </td></tr>
    <tr><td class="paramname">user_data</td><td>see documentation of '<a class="el" href="structwickr__stream__key.html" title="A data structure representing the stream encoding / decoding key material A stream key holds informat...">wickr_stream_key</a>' structure </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated stream key owning the properties passed in </dd></dl>

</div>
</div>
<a id="ga3bb3dec760c5b7f3a1bd2d0bb13bcc79"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3bb3dec760c5b7f3a1bd2d0bb13bcc79">&#9670;&nbsp;</a></span>wickr_stream_key_destroy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wickr_stream_key_destroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwickr__stream__key.html">wickr_stream_key_t</a> **&#160;</td>
          <td class="paramname"><em>stream_key</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destroy a stream key</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stream_key</td><td>a pointer to the stream key to destroy. All properties of '*stream_key' will also be destroyed </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gae1540c98a88e2f62e96fb2ee209e2290"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae1540c98a88e2f62e96fb2ee209e2290">&#9670;&nbsp;</a></span>wickr_stream_key_serialize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a>* wickr_stream_key_serialize </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__stream__key.html">wickr_stream_key_t</a> *&#160;</td>
          <td class="paramname"><em>key</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Serialize a stream key</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">key</td><td>the key to serialize </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a serialized protocol buffer object representing the properties of 'key' </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
